#pragma once
using namespace std;

//消息基类
class BaseMsg{
public:
    enum TYPE{
        SERVICE = 1,
        SOCKET_ACCEPT = 2,
        SOCKET_RW = 3
    };
    uint8_t type;                   //消息类型
    char load[999999]{};    //用于检测内存泄露,仅用于调试
    virtual ~BaseMsg(){};
};

//有新连接
class SocketAcceptMsg : public BaseMsg{
    public:
        int listenFd;
        int clientFd;
};

//可读可写
class SocketRWMsg : public BaseMsg{
    public:
        int fd;
        bool isRead = false;
        bool isWrite = false;
};